import { getToken } from '@/utils/token'
import sessionstore from '@/utils/sessionStore'

export default{
    token:({user}) => user.token || getToken(),
    role:({user}) => user.role || sessionstore.get('role'),
    menu:({user}) => {
       return user.menu.length==0? sessionstore.get('menu') : user.menu
    }
}